import { useDict } from "@/dict/index.js"

export function useIndex(){
    const { useDictItem } = useDict()
    const column = [
        {
            title: "姓名",
            field: "user_name",
        },
        {
            title: "卡号",
            field: "card_number",
        },
        {
            title: "身份证",
            field: "card_id",
        },
        {
            title: "性别",
            field: "gender",
            format: ({ cellValue }) => useDictItem(cellValue, 'ganderModules')?.label
        },
         {
            title: "押金",
            field: "booktotal",
            format: () => 300
        },
        {
            title: "办卡日期",
            field: "card_date",
            width: 200
        },
        {
            title: "截止日期",
            field: "deadline_date",
            width: 200
        },
        {
            title: "借阅数量",
            field: "booktotal",
        },
        {
            type: "slot",
            slotName: "status",
            title: "状态",
            field: "status",
            width: 300
        },
        {
            title: "启用",
            field: "enable",
            type: "slot",
            slotName: "enable"
        },
        {
            type: "operation",
            width: '500px'
        }
    ]
    
    return {
        column
    }
}
